/**
 * 
 */
package truerefactor.refactor;

import java.util.List;

import truerefactor.graph.ClassNode;
import truerefactor.graph.CodeGraph;
import truerefactor.graph.CodeNode;

/**
 * An Implementation of the Introduce Parameter Object Refactoring Technique
 * 
 * @author Isaac
 */
public class IntroduceParamObject extends Refactoring {

    /**
     * 
     */
    public IntroduceParamObject()
    {
        this.name = "Introduce Parameter Object";
        this.description = "";
    }

    /*
     * (non-Javadoc)
     * @see
     * truerefactor.refactor.Refactoring#execute(truerefactor.graph.CodeNode
     * [])
     */
    @Override
    public void execute(CodeGraph graph)
    {
        // 1. Create a new calss to represent the group of parameters you are
        // replacing. Make this class immutable

        // 2. Use Add Parameter for the new data clump. Use a null for this
        // parameter in all the callers.
        // a. If you have many callers, you retain the old signature and let it
        // call the new method. Apply the refactorings on the old method first.
        // You can then move the callers over one by one and remove the old
        // method when you are done.

        // 3. For each parameter in the data clump, remove the parameter from
        // the signature. Modify the callers and method body to use the
        // parameter object for that value.

        // 4. When you have removed the parametes, look for behavior that you
        // can move into the parameter object with Move Method
        // a. This may be a whole method or part of a method, if it is a part of
        // a method, use Extract Method first, and then move the new method
        // over.

    }
}
